/**
 * Created by bethinner on 5/17/16.
 */
import React, { Component } from 'react';

import { connect } from 'react-redux'
import Link from 'react-router/lib/Link'
import browserHistory from 'react-router/lib/browserHistory'


export default class BottomBar extends Component {
    constructor(props) {
        super(props);

    }

    componentWillMount() {

    }

    goMyCoupons() {
        browserHistory.push({
            pathname: `/myCoupons`,
            state: {
                type: 0,
            }
        });
    }
    goUserInfo() {
        browserHistory.push({
            pathname: `/userInfo`
        });
    }




    render() {
        return (
            <div className="bottomBar" style={BarStyle.base}>
                <div style={{width:"45.83333333%",float:"left"}}>
                    <div style={divStyle} onClick={this.goMyCoupons.bind(this)}>
                        <div style={{width:"20px",height:"20px",float:"left", position:"absolute",left:"11%",top:"14px",backgroundImage: "url(public/img/index_sprite.png)",backgroundSize:"cover",backgroundPosition:"0 2px",backgroundRepeat:"no-repeat" }}></div>
                        {/*<img src="public/img/ic_my_coupons.png" style={imgStyle}/>*/}
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我的卡券
                    </div>
                </div>
                <div style={{width:"8.33333333%",float:"left"}}>
                        <div style={{height:'30px',width:"1px",margin:"10px auto",backgroundColor: "white"}}>
                        </div>
                </div>
                <div style={{width:"45.83333333%",float:"left"}}>
                    <div style={divStyle}
                         onClick={this.goUserInfo.bind(this)}>
                        <div style={{width:"20px",height:"20px",float:"left", position:"absolute",left:"66%",top:"14px",backgroundImage: "url(public/img/index_sprite.png)",backgroundSize:"cover",backgroundPosition:"0 -17px",backgroundRepeat:"no-repeat" }}></div>
                        {/*<img src="public/img/ic_user_info.png" style={imgStyle}/>*/}
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户管理
                    </div>
                </div>
            </div>

        )
    }
}
let BarStyle = {
    base: {
        color: "white",
        backgroundColor: "#FF6347",
        fontSize: "16px",
        textAlign: "center",
        position: 'fixed',
        zIndex: "2",
        bottom: '0px',
        width: '100%',
        height: '50px'
    },
    highlightStyle: {
        color: "green",
        backgroundColor: "white"
    }

};


let divStyle={
    height: "50px",
    textAlign: "center",
    lineHeight:"50px"};



let imgStyle={width:"20px",height:"20px",marginBottom:'-4px' ,marginRight:"4px"};
BottomBar.defaultProps = {}

BottomBar.propTypes = {}


